Skip to content

test(deny): pin advisory scope keys to all - #162

Merged
github-actions[bot] merged 1 commit into
mainfrom
test/deny-advisory-keys
Nov 1, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
test/deny-advisory-keys

Conversation

@brujack

@brujack brujack commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • tests/test_deny_policy.py gains test_advisories_cover_transitive_crates: deny.toml's [advisories] must set unsound = "all" and unmaintained = "all".
  • Why: the GPL/MIT fixture crates prove the licence policy loads, but they cannot see the advisory scope keys. cargo-deny 0.20.2 defaults unsound to "workspace", which hid RUSTSEC-2026-0306 and -0205 until feat(deps): cargo-deny gate, unsafe guard, command.run env fix, edition 2024 #159 set "all"; before this test, reverting that line would pass CI.
  • Matches math's key-level guard (the operator asked for the two repos to agree). Key-level only — spec N8 still rules out a whole-file pin.
  • CLAUDE.md Advisory Triage line mentions the new check.

Test Plan

  • Mutation controls, each run against the real deny.toml and restored: unsound = "workspace" → test fails; unsound line deleted → fails; unmaintained = "workspace" → fails
  • make test — 1187 Rust, 198 Python, 16 bats pass
  • Coverage: Python floor 90 / unchanged (test-only change); Rust unchanged

Note: ruff.toml targets py310 while CI runs 3.13, so ruff groups tomllib (stdlib since 3.11) as third-party. Left as is; not this PR's concern.

Code review

SKIP: one 9-line test plus one CLAUDE.md clause; mutation-verified. Not one of branch-code-review's three SKIP cases — disclosed rather than claimed.

Spec alignment

SKIP: no plan executed; follow-up guard for spec R2 of docs/cursor/specs/2026-10-31-rust-standards-edition-2024-spec.md.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RMRWKKn1ZnoEgzb3hX8ewo

The fixtures cannot see unsound/unmaintained; a revert to cargo-deny's
"workspace" default (which hid RUSTSEC-2026-0306/0205) would pass CI.
Matches math's key-level guard.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RMRWKKn1ZnoEgzb3hX8ewo
@github-actions
github-actions Bot merged commit 1e9f703 into main Nov 1, 2026
13 checks passed
@brujack
brujack deleted the test/deny-advisory-keys branch November 1, 2026 03:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant